import request from '@/utils/request'

// 查询站点分类下拉树结构
export function treeselect(query) {
  return request({
    url: '/modules/stationType/treeselect',
    method: 'get',
    params: query
  })
}

// 查询站点分类列表
export function listStationType(query) {
  return request({
    url: '/modules/stationType/list',
    method: 'get',
    params: query
  })
}

// 查询站点分类列表（排除节点）
export function listStationTypeExcludeChild(stationTypeId) {
  return request({
    url: '/modules/stationType/list/exclude/' + stationTypeId,
    method: 'get'
  })
}

// 查询站点分类详细
export function getStationType(stationTypeId) {
  return request({
    url: '/modules/stationType/' + stationTypeId,
    method: 'get'
  })
}

// 新增站点分类
export function addStationType(data) {
  return request({
    url: '/modules/stationType',
    method: 'post',
    data: data
  })
}

// 修改站点分类
export function updateStationType(data) {
  return request({
    url: '/modules/stationType',
    method: 'put',
    data: data
  })
}

// 删除站点分类
export function delStationType(stationTypeId) {
  return request({
    url: '/modules/stationType/' + stationTypeId,
    method: 'delete'
  })
}
